unknown option --help type -h to see help


Envelope (mathematics) generator

Generating geometric line art


🗓️ Created: 2024-05-12 | Modified: 2025-08-03

Envelope

Needed a clean picture of Envelope (mathematics), for PCB silk screen art. I used Python Pillow

pip install pillow~=10.3
from PIL import Image, ImageDraw

# https://en.wikipedia.org/wiki/Envelope_%28mathematics%29

dim = 200  # Image dimensions (pixels)
skip = 10   # Only draw a line every X pixels
width = 1   # Line width
color = "white"

with Image.new(mode = "RGB", size = (dim, dim)) as im:  # mode="RGBA" for transparent background
    draw = ImageDraw.Draw(im)

    for i in range(dim):
        if i % skip:
            continue
        rev = dim - i
        draw.line([(0, i), (i, dim)], fill=color, width=width) 

    im.show()  # im.save("/tmp/Envelope.png")

Comments

INSERT INTO comment(nickname, visitor_url, contact, show_contact, comment, public) VALUES (
, , , , ,
);
(Will await approval before becoming public)

SELECT id, nickname, comment, page_url, visitor_url, (CASE WHEN show_contact THEN contact ELSE NULL END) as contact_info, created_at
FROM comment WHERE approved AND public AND page_url = '/Envelope (mathematics) generator' ORDER BY created_at DESC;
*No comments*